package org.sundatagroup.aurora;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.context.annotation.Bean;

/**
 * <p>启动位置
 * <p>从这里启动项目, 默认不会编译和运行所有在 test 域的文件.
 * <br>如果想要编译和运行 test 域中的文件的话,
 * 请启动 <code>StartTestApplication.java</code> (该类在 test 域里)
 * </p>
 * 
 * @author Zdream
 * @date 2018-03-20
 * @version 0.1
 */
@SpringBootApplication

public class StartApplication {
	public static void main(String[] args) {
		Static.load();
		SpringApplication.run(StartApplication.class, args);
	}

	@Bean
	public EmbeddedServletContainerCustomizer containerCustomizer(){
		return new EmbeddedServletContainerCustomizer() {
			@Override
			public void customize(ConfigurableEmbeddedServletContainer container) {
				container.setSessionTimeout(60);//单位为S
			}
		};
	}
}


